package com.aitesting.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author zz
 * @since 2022-02-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("api_group")
public class ApiGroup implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 接口分组id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 接口分组名称
     */
    @NotEmpty(message = "分组名称不能为空")
    private String name;

    /**
     * 接口分组描述
     */
    private String description;

    /**
     * 创建时间
     */
    @TableField("createTime")
    @JsonFormat(pattern = "YYYY-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("updateTime")
    @JsonFormat(pattern = "YYYY-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 项目id
     */
    private Integer projectId;

}
